package com.hy.medicine.dingdan.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 立即购买请求VO
 */
@Data
@ApiModel(value = "立即购买请求")
public class DirectPurchaseVO {

    @ApiModelProperty("药品ID")
    @NotNull(message = "药品ID不能为空")
    private Integer medicineId;

    @ApiModelProperty("购买数量")
    @NotNull(message = "购买数量不能为空")
    @Min(value = 1, message = "购买数量必须大于0")
    private Integer quantity;

    @ApiModelProperty("收货人姓名")
    @NotBlank(message = "收货人姓名不能为空")
    private String receiverName;

    @ApiModelProperty("收货人电话")
    @NotBlank(message = "收货人电话不能为空")
    private String receiverPhone;

    @ApiModelProperty("收货地址")
    @NotBlank(message = "收货地址不能为空")
    private String receiverAddress;

    @ApiModelProperty("支付方式: 1-微信, 2-支付宝, 3-银行卡")
    @NotNull(message = "支付方式不能为空")
    private Integer paymentType;

    @ApiModelProperty("订单备注")
    private String remark;
}
